package com.software.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author wyj
 * @since 2024-03-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("tb_customer_info")
public class CustomerInfoBean implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 登陆表id
     */
    @TableField("customer_login_id")
    private Integer customerLoginId;

    /**
     * 用户名
     */
    @TableField("customer_name")
    private String customerName;


    @TableField("customer_sex")
    private Integer customerSex;

    /**
     * 手机号
     */
    @TableField("customer_phone")
    private String mobilePhone;

    /**
     * 邮箱
     */
    @TableField("customer_email")
    private String customerEmail;

    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("register_time")
    private Date registerTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private Date updateTime;


    @TableField(exist = false)
    private CustomerLoginBean customerLoginBean;

    /**
     * 头像地址
     */
    @TableField("avatar_url")
    private String avatarUrl;

}
